﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<GlassStore.Models.TopCatalogue>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	顶级目录
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>顶级目录列表</h2>

    <table>
        <tr>
            <th>操作</th>
            <th>
                目录名
            </th>
            <th>
                描述
            </th>
            <th>
                图片
            </th>
        </tr>

    <% foreach (var item in Model) { %>
    
        <tr>
            <td>
                <%: Html.ActionLink("二级目录", "SubCatalogue", new { topid = item.TopCatalogueId})%> |
                <%: Html.ActionLink("编辑", "EditTop", new { id = item.TopCatalogueId })%> |
                <%: Html.ActionLink("删除", "DeleteTop", new { id = item.TopCatalogueId })%>
            </td>
            <td>
                <%: item.Name %>
            </td>
            <td>
                <%: item.Description %>
            </td>
            <td>
                <img src="<%:item.PictureURL %>" alt="没有图片" width="122" height="40"/>
            </td>
        </tr>
    
    <% } %>

    </table>

    <p>
        <%: Html.ActionLink("添加", "CreateTop") %>|
        <%: Html.ActionLink("返回", "Index", "Manager") %>
    </p>

</asp:Content>

